<?php
use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which | is assigned the "Api" middleware group. Enjoy building your API!
|
*/

//api文章相关路由
Route::group(['domain'=>'api.aixinjituan.com', 'prefix'=>"passport", 'namespace' => 'Api'], function () {
    Route::any( 'imgcode', "PassportController@imgCode");
    Route::any('index', "PassportController@index");
    Route::any('sendcode', "PassportController@sendcode");
    Route::any('login', "PassportController@login");


});


//api文章相关路由
Route::group(['domain'=>'api.aixinjituan.com', 'prefix'=>"article", 'namespace' => 'Api'], function () {
    Route::any('index',"ArticleController@index");
    Route::any('categories',"ArticleController@categories");
    Route::any('list',"ArticleController@articleList");
    Route::any('detail', 'ArticleController@detail');
    Route::any('homelist', 'ArticleController@homeList');
    Route::any('aboutnews', 'ArticleController@aboutNews');
    Route::any('search', 'ArticleController@search');
});

//手机站文章相关接口
Route::group(['domain' => 'm.aixinjituan.com','prefix'=>'article','namespace'=>'H5'], function () {
    Route::any('h5list', 'ArticleController@articleList');
    Route::any('h5categories', 'ArticleController@categories');
    Route::any('h5homelist', 'ArticleController@homeList');
    Route::any('h5detail', 'ArticleController@detail');
    Route::any('h5aboutnews', 'ArticleController@aboutNews');
    Route::any('stock', 'ArticleController@stock');
});

//api需要验证登录接口
Route::group(['domain'=>'api.aixinjituan.com', 'middleware'=>'login','prefix'=>"article", 'namespace' => 'Api'], function () {
     Route::any('login',"ArticleController@login");
});




//电商未登陆状态路由
Route::group(['domain'=>'shop.aixinjituan.com', 'prefix'=>"shop", 'namespace' => 'H5\\Shop'], function () {
    Route::any( 'imgcode', "PassportController@imgCode");
    Route::any('index', "PassportController@index");
    Route::any('get_code', "PassportController@get_code");
    Route::any('login', "PassportController@login");
    Route::any('updatemobile', 'PassportController@shopupdatemobile');



});

//电商登陆状态路由
Route::group(['domain' => 'shop.aixinjituan.com','middleware'=>'login', 'prefix'=>'shop','namespace'=>'H5\\Shop'], function () {

    Route::any('payunline', 'PayController@unline');
    Route::any('vipsure', 'PayController@vipsure');
    Route::any('paystatus', 'PayController@paystatus');
    Route::any('check_paypwd', 'PayController@check_paypwd');
    Route::any('submitpwd', 'PayController@submitpwd');

    Route::any('userinfo', 'UserController@userinfo');
    Route::any('userstatus', 'UserController@userstatus');

    Route::any('register', 'UserController@register');
    Route::any('wait_refresh', 'UserController@wait_refresh');
    Route::any('changename', 'UserController@changeName');

    Route::any('user_recommend','RecommendController@userRecommend');
    //推荐统计
    Route::any('user_recommend_list','RecommendController@userRecommendList');
    //推荐详情
    Route::any('user_recommend_detail','RecommendController@userRecommendDetail');
    //保存推荐信息
    Route::any('store_recommend','RecommendController@storeRecommend');
    //我的培育
    Route::any('user_cultivation','CultivationController@userCultivation');
    //培育查看更多
    Route::any('user_cultivation_more','CultivationController@userCultivationMore');
//提现设置相关接口
    //添加提现账号
    Route::any('user_account_add','UserCardsController@store');
    //删除提现账号
    Route::any('user_account_delete','UserCardsController@destroy');
    //获取该用户的提现账户列表
    Route::any('user_account_list','UserCardsController@index');
//个人中心主页面
    //用户余额
    Route::any('user_balance','MoneyReportController@index');
    //用户收支明细列表
    Route::any('amount_list','MoneyReportController@amountList');
    //用户收支明细详情
    Route::any('amount_detail','MoneyReportController@amountDetail');
    //申请提现的接口
    Route::any('user_cash','CashRecordController@cashStore');
    //申请复投的接口
    Route::any('double','PeakReportController@double');
    //复投的查询接口
    Route::any('douRefresh','PeakReportController@douRefresh');
    // 建点接口
    Route::any('see_point', 'PointsController@index');
    // 量碰统计
    Route::any('amount_touch', 'TouchController@index');
    Route::any('amount_total', 'TouchController@sales');
    Route::any('amount_more', 'TouchController@daySales');
    // 地址管理
    Route::any('addresses', 'AddressController@index');
    Route::any('add_address', 'AddressController@store');
    Route::any('address', 'AddressController@show');
    Route::any('update_address', 'AddressController@update');
    Route::any('del_address', 'AddressController@delete');
    Route::any('set_default_address', 'AddressController@setDefault');
    Route::any('default_address', 'AddressController@getDefault');
    // 商城
    Route::any('goods', 'GoodsController@index');
    Route::any('goods_detail', 'GoodsController@show');
    // 订单
    Route::any('confirm_order_info', 'OrderController@confirmOrderInfo');
    Route::any('confirm_order', 'OrderController@confirmOrder');
    Route::any('order_success', 'OrderController@orderSuccessInfo');
    Route::any('order', 'OrderController@show');
    Route::any('orders', 'OrderController@index');
    //层碰接口
    Route::any('touch_layer', 'TouchController@touchLayer');
    Route::any('test', 'TouchController@test');
    Route::get('test2', 'TouchController@test2');
});


